<?php
require(dirname(__FILE__) . '/includes/init.php');
if($_REQUEST['action'] == 'done'){
	$id = $_REQUEST['id'];
	$db->query("update ".$ecs->table('short_note')." set status=1 where note_id='".$id."'");
}
$sql = "select * from ".$ecs->table('short_note')." where status=0";
$note_list = $db->getAll($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 每日补单登记 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
<h1>
<span class="action-span1"><a target="_top" href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 每日补单登记 </span>
<div style="clear:both"></div>
</h1>
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>平台</th>
	<th>内容</th>
    <th>登记人</th>
	<th>登记时间</th>
	<th>操作</th>
  </tr>
  <?php
  if(count($note_list)>0){
	foreach($note_list AS $note){
  ?>
  <tr>
    <td><?php if($note['pt_cat']==1){ echo '京东商城';}else if($note['pt_cat']==2){echo '一号店';}else if($note['pt_cat']==3){echo 'QQ商城';}else if($note['pt_cat']==4){echo '天猫商城';}?></td>
    <td><?php echo $note['descr'];?></td>
	<td><?php echo $note['enrol_name'];?></td>
	<td><?php echo date('Y-m-d H:i:s',$note['enrol_time']);?></td>
	<td><a href="?action=done&id=<?php echo $note['note_id'];?>">处理</a></td>
  </tr>
  <?php
  	}
  }	
  ?>
</div>